using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class boxpull : MonoBehaviour
{
    public bool beingPushed;
    float xPos;
    public bool left;
    public bool right;


    // Start is called before the first frame update
    void Start()
    {
        if (left)
        {
            GetComponent<boxThrow>().enabled = false;
        }

        if (right)
        {
            GetComponent<boxThrowRight>().enabled = false;
        }
        xPos = transform.position.x;

        
    }

    // Update is called once per frame
    void Update()
    {
        
        
        //Debug.Log(my_rigidbody2d.gravityScale);
        if (beingPushed == false)
        {
            transform.position = new Vector3(xPos, transform.position.y);
        }
        else
        {
            xPos = transform.position.x;
        }
    }
}
